<template :style="dataTable">
	<div>

<b @click="getListWay">获取</b>
		<!--列表-->
		<el-table :height=heightData   :data="dataList" highlight-current-row v-loading="listLoading" @selection-change="selsChange" style="width: 100%;">
			<el-table-column type="selection" width="55">
			</el-table-column>
			<el-table-column type="index" width="60">
			</el-table-column>
			<el-table-column prop="userName" label="用户姓名" >
			</el-table-column>
		</el-table>

		<!--工具条-->
		<!--<el-col :span="24" class="toolbar">-->
			<!--<el-button type="danger" @click="batchRemove" :disabled="this.sels.length===0">批量删除</el-button>-->
			<!--<el-pagination layout="prev, pager, next" @current-change="handleCurrentChange" :page-size="20" :total="total" style="float:right;">-->
			<!--</el-pagination>-->
		<!--</el-col>-->
	</div>
</template>

<script>
    import util from '../../common/js/util'
    const insurance = require( '../../api/insurance.js');        //  接口js引用
    import { getPosiStuList ,getUserList} from '../../api/api';
    export default {
        data() {
            return {
                listLoading:false,
                dataList:[],
                heightData: document.body.clientHeight-260,
                dataTable:document.body.clientHeight-260,
            }
        },
        methods: {
            getListWay:function(){
                $.ajax({
                    url:'http://114.55.56.242:8090/getdownresult?key=1',
                    type:"get",
                    success:function(data){
                        console.log(data);
                        this.listLoading = false;
                        // that.dataList = ;
                    },
                    error: function(jqXHR){
                        that.$message.error('发生错误'+jqXHR.status);
                    }
                });
			},
            selsChange: function (sels) {
                this.sels = sels;
            },
            //批量删除
            batchRemove: function () {
                var ids = this.sels.map(item => item.id).toString();
                this.$confirm('确认删除选中记录吗？', '提示', {
                    type: 'warning'
                }).then(() => {
                    this.listLoading = true;
                    //NProgress.start();
                    let para = { ids: ids };
                    batchRemoveUser(para).then((res) => {
                        this.listLoading = false;
                        //NProgress.done();
                        this.$message({
                            message: '删除成功',
                            type: 'success'
                        });
                        this.getListWay();
                    });
                }).catch(() => {

                });
            }
        },
        mounted() {
            this.getListWay();
        }
    }

</script>

<style scoped>

</style>